package testplan.services;

import testplan.entities.TestCase;
import testplan.entities.TestPlan;

import java.util.Set;

/**
 * Test plan services.
 */
public interface TestPlanService
{
    /**
     * Create a test plan.
     * @param name plan name
     * @param description plan description
     * @param projectId project ID
     * @param releaseId release ID
     * @param createBy creator user ID
     */
    public void createTestPlan(String name, String description, long projectId, long releaseId, long createBy);

    /**
     * Get all the test plans of a project.
     * @param projectId project ID
     * @return a set of test plans
     */
    public Set<TestPlan> getTestPlans(long projectId);

    /**
     * Get all the test plans of a project under a given release version.
     * @param projectId project ID
     * @param releaseId release ID
     * @return a set of test plans
     */
    public Set<TestPlan> getTestPlans(long projectId, long releaseId);

    /**
     * Add a test case to a test plan.
     * @param title title
     * @param description description
     * @param steps steps
     * @param expectedResults expected results
     * @param createdBy creator user ID
     * @param planId test plan ID
     */
    public void addTestCase(String title, String description, String steps, String expectedResults, long createdBy, long planId);

    /**
     * Remove a test case.
     * @param caseId test case ID
     */
    public void removeTestCase(long caseId);

    /**
     * Get all the test cases for a plan.
     * @param planId plan ID
     * @return a set of test cases.
     */
    public Set<TestCase> getTestCases(long planId);

}
